package com.glela.platform.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.glela.platform.model.UserPointJournal;

public interface UserPointJournalMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserPointJournal userPointJournal);

    int insertSelective(UserPointJournal userPointJournal);

    UserPointJournal selectByPrimaryKey(Long id);
    
    /**
	 * 根据数据源ID和账务类型查找流水
	 * @author gaoweiqi
	 * @date 2017年8月124日 12:44:05
	 */
    UserPointJournal selectBySourceIDAndBusinessType(@Param("SourceID") Long SourceID,@Param("BusinessType") int BusinessType);
    
    List<UserPointJournal> selectBySourceIDBusinessType(@Param("SourceID") Long SourceID,@Param("BusinessType") int BusinessType);

    int updateByPrimaryKeySelective(UserPointJournal userPointJournal);

    int updateByPrimaryKey(UserPointJournal userPointJournal);

	List<UserPointJournal> getMyPointListByPage(@Param("userId") Long userId,@Param("pageLimit") int pageLimit,
			@Param("pageSize") Integer pageSize);

	/**
	 * 批量保存积分流水
	 * @author gaoweiqi
	 * @date 2017年8月26日 12:44:05
	 */
	int batchInsert(List<UserPointJournal> userPointJournalList);
}